function decompile(target: function | LuaSourceContainer | string): string
required
The
LuaSourceContainer function or string that should get decompiled into pseudocode.Example of decompiling a script
local script = game.StarterPlayer.StarterPlayerScripts.RbxCharacterSounds
print(decompile(script))
Output (shortened)
local Players = game:GetService("Players");
local RunService = game:GetService("RunService");
local SoundService = game:GetService("SoundService");
local AtomicBinding = require(script:WaitForChild("AtomicBinding"));
local function loadFlag(u1) -- Line: 12
local success, result = pcall(function() -- Line: 13
-- upvalues: u1 (copy)
return UserSettings():IsUserFeatureEnabled(u1);
end);
return success and result;
end;
local u2 = "UserSoundsUseRelativeVelocity2";
local success, result = pcall(function() -- Line: 13
-- upvalues: u2 (copy)
return UserSettings():IsUserFeatureEnabled(u2);
end);
local u3 = success and result;
local u4 = "UserNewCharacterSoundsApi3";
local success2, result2 = pcall(function() -- Line: 13
-- upvalues: u4 (copy)
return UserSettings():IsUserFeatureEnabled(u4);
end);
-- And 600 more lines...
Example of decompiling a function
local function exampleFunction()
local part = Instance.new("Part")
part.Name = "Hello, world!"
part:Destroy()
end
print(decompile(exampleFunction))
Output
local Part = Instance.new("Part");
Part.Name = "Hello, world!";
Part:Destroy();
